import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router';
import login from '../view/login/index.vue'

let routes = [
    {
        path: '/',
        component: login
    },
    {
        path: '/date',
        component: () => import('@/view/date/date.vue')
    },
    {
        path: '/upload',
        component: () => import('@/view/upload/index.vue')
    },
    {
        path: '/goods',
        component: () => import('@/view/goodsList/index.vue')
    },
    {
        path: '/photo',
        component: () => import('@/view/photo/index.vue')
    },
    {
        path: '/text',
        component: () => import('@/view/text/index.vue')
    },
    {
        path: '/interviewList',
        component: () => import('@/view/interviewList/index.vue')
    },
    {
        path: '/topicList',
        component: () => import('@/view/topicList/index.vue')
    },
    {
        path: '/yhapps',
        component: () => import('@/view/apps/index.vue')
    },
    {
        path: '/yhupload',
        component: () => import('@/view/yhupload/index.vue')
    },
    {
        path: '/yhlist',
        component: () => import('@/view/yhapplist/index.vue')
    },
    {
        path: '/yhTestPage', 
        component: () => import('@/view/yhTestPage/index.vue')
    },
]



const router = createRouter({
    history: createWebHashHistory(),   //history还是hash
    routes,
    // [
    // {path: '路径1', component: 加载的组件},
    // {path: '路径2', component: () => import(懒加载的路径)},
    // {path: '路径2', component: () => import(懒加载的路径), children: [{子路由1}, {子路由2}, {子路由3}]}
    // ]
})


export default router;
